{#{% extends 'myadmin/base/content_base.html' %}#}
{% extends 'myadmin/base/obj_list.html' %}
{% load static %}

    {% block table_content %}
         <div style="margin-bottom: 5px">
                <form id="bb" class="form-inline user-query">
{#                    <div class="form-group">#}
{#                        <label for="">用户名</label>#}
{#                        <input type="text" class="form-control" name="username" value="{{ username }}">#}
{#                    </div>#}
{#                    <div class="form-group">#}
{#                        <label for="">用户名</label>#}
{#                        <input id ="cc" type="text" class="form-control" name="haha">#}
{#                    </div>#}
                    <div style="float: left" class="form-group">
                        <label for="">课程类别</label>
                        <select  name="group" id="" class="form-control1">
                            <option value="">所有</option>
                            {% for obj in categorytype %}
                                <option value="{{ obj.id }}">{{ obj }}</option>
                            {% endfor %}
                        </select>
                    </div>
                    <div style="float: left" class="form-group">
                        <label for="">&nbsp; &nbsp; 课程名&nbsp; </label>
                        <select  name="group" id="" class="form-control2">
                            <option value="">所有</option>
                            {% for obj in category %}
                                <option value="{{ obj.id }}">{{ obj }}</option>
                            {% endfor %}
                        </select>
                    </div>

                    <button id="aa" type="button" class="btn btn-info query">查询</button>
{#                    <button type="button" class="btn btn-default reset">重置</button>#}
                </form>
            </div>
  <div class="row">

  <li style="color: red">点击排序数字可修改课件选择课件</li>
    <div class="col-md-12 col-xs-12 col-sm-12">
      <div class="box box-primary">
{#        <div class="box-header">#}
{#          <button class="btn btn-primary pull-right" id="btn-add-tag">添加课程</button>#}
{#        </div>#}
        <div class="box-body">
          <table class="table table-bordered table-hover">
            <thead>
            <tr>
        <th>#</th>

        <th>课件名</th>
          <th>ppt片段名称</th>
        <th>所属课程</th>
        <th>所属课程类别</th>
        <th>是否为示范视频</th>
        <th>是否为教学大纲</th>
{#        <th>时长</th>#}
        <th>封面</th>
    </tr>
            </thead>
            <tbody id="tbody">
            {% for obj in course %}
        <tr>
            <td style="width: 40px" data-url="{% url 'myadmin:course_update' obj.id %}"><a href="#">{{ forloop.counter }}</a></td>

            <td>{{ obj.lesson }}</td>
           <td>{{ obj.title }}</td>
            <td>{{ obj.category.name }}</td>
            <td>{{ obj.category.parent }}</td>
            <td>{% if obj.is_example %}是{% else %}否{% endif %}</td>
            <td>{% if obj.is_outline %}是{% else %}否{% endif %}</td>
{#            <td>{{ obj.duration }}</td>#}
            <td><img src="{{ obj.cover_url }}" alt="" style="width: 80px;height: 20px"></td>
        </tr>
    {% endfor %}


            </tbody>
          </table>
        </div>
      </div>
    </div>
  </div>
      <div class="modal modal-danger fade" id="modal-delete">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span></button>
                    <h4 class="modal-title">警告</h4>
                </div>
                <div class="modal-body">
                    <p>One fine body&hellip;</p>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-outline pull-left" data-dismiss="modal">取消</button>
                    <button type="button" class="btn btn-outline delete-confirm">确定</button>
                </div>
            </div>
            <!-- /.modal-content -->
        </div>
        <!-- /.modal-dialog -->
    </div>

{% endblock %}
{#<style type="text/css">#}
{#        .form-group{#}
{#            width: 140px;#}
            {#float: left;#}
{#        }#}
{#        .user-query{#}
{#            float: right;#}
{#        }#}
{#    </style>#}